| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/file-manager-advanced/application/assets/dist/ |
Upload File : |
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[886],{3886(e,t,i){i.r(t),i.d(t,{default:()=>g});var n=i(6540),a=i(7850),o=i(5688),s=(i(7554),i(4848));function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){c(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function c(e,t,i){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,o,s,l=[],r=!0,d=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;r=!1}else for(;!(r=(n=o.call(i)).done)&&(l.push(n.value),l.length!==t);r=!0);}catch(e){d=!0,a=e}finally{try{if(!r&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return p(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function g(){var e,t,i,l,r,c,u=(0,o.lA)(),p=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(t=window.afmReact)||void 0===t?void 0:t.nonce)||"",g=m((0,n.useState)(null),2),h=g[0],x=g[1],b=m((0,n.useState)(!0),2),v=b[0],y=b[1],_=m((0,n.useState)(!1),2),w=_[0],j=_[1],S=m((0,n.useState)(null),2),k=S[0],N=S[1],z=m((0,n.useState)("general"),2),C=(z[0],z[1],m((0,n.useState)("general-settings"),2)),T=C[0],I=C[1],R=m((0,n.useState)({}),2),F=R[0],M=R[1],A=m((0,n.useState)(!1),2),D=A[0],O=A[1],E=m((0,n.useState)(!1),2),P=E[0],W=E[1],B=m((0,n.useState)(!1),2),H=B[0],L=B[1],U=m((0,n.useState)({}),2),K=U[0],V=U[1],q=(null===(i=window.afmReact)||void 0===i?void 0:i.hasPro)||!1,Q=(null===(l=window.afmReact)||void 0===l?void 0:l.currentPlan)||"free",Y=(null===(r=window.afmReact)||void 0===r||r.pricingUrl,(0,a.w)("advance_themes",Q,q)),G=(0,a.w)("code_editor_themes",Q,q);(0,n.useLayoutEffect)(function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){sessionStorage.setItem("afm-settings-hash-just-set","true");var t=sessionStorage.getItem("afm-settings-subtab"),i="general-settings";if("general-settings"===t||"advanced-settings"===t)i=t;else if(e.startsWith("settings/")){var n=e.split("/");if(n.length>1){var a=n[1].split("?")[0];"general-settings"!==a&&"advanced-settings"!==a||(i=a,sessionStorage.setItem("afm-settings-subtab",a))}}I(i);var o="#/settings/".concat(i);if(window.location.hash!==o)if(window.history&&window.history.replaceState){var s=window.location.href.split("#")[0]+o;window.history.replaceState(null,"",s),window.location.hash=o}else window.location.hash=o;sessionStorage.setItem("afm-settings-subtab",i),setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}},[]),(0,n.useEffect)(function(){T&&sessionStorage.setItem("afm-settings-subtab",T)},[T]),(0,n.useEffect)(function(){var e=function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){if(e.startsWith("settings/")){var t=e.split("/");if(t.length>1){var i=t[1].split("?")[0];if("general-settings"===i||"advanced-settings"===i)return sessionStorage.setItem("afm-settings-subtab",i),void I(function(e){return e!==i?i:e})}}if("settings"===e){var n=sessionStorage.getItem("afm-settings-subtab")||"general-settings",a="general-settings"===n||"advanced-settings"===n?n:"general-settings";sessionStorage.setItem("afm-settings-hash-just-set","true");var o="#/settings/".concat(a);if(window.history&&window.history.replaceState){var s=window.location.href.split("#")[0]+o;window.history.replaceState(null,"",s)}else window.location.hash=o;I(function(e){return e!==a?a:e}),setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}}};return window.addEventListener("hashchange",e),(window.location.hash||"").replace(/^#/,"").replace(/^\//,"").startsWith("settings")&&e(),function(){window.removeEventListener("hashchange",e)}},[]);var J=n.useRef(!0);(0,n.useEffect)(function(){if(J.current){J.current=!1;var e=window.location.hash.replace(/^#/,"").replace(/^\//,"");if(e!=="settings/".concat(T)&&!e.startsWith("settings/")){sessionStorage.setItem("afm-settings-hash-just-set","true");var t="#/settings/".concat(T);if(window.history&&window.history.replaceState){var i=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",i),window.location.hash=t}else window.location.hash=t;setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}}else{sessionStorage.setItem("afm-settings-hash-just-set","true");var n="#/settings/".concat(T);if(window.location.hash!==n)if(window.history&&window.history.replaceState){var a=window.location.href.split("#")[0]+n;window.history.replaceState(null,"",a),window.location.hash=n}else window.location.hash=n;setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}},[T]),(0,n.useEffect)(function(){u&&p?setTimeout(function(){Promise.all([fetch("".concat(u,"file-manager-advanced/v1/settings"),{credentials:"same-origin",headers:{"X-WP-Nonce":p}}),fetch("".concat(u,"file-manager-advanced/v1/integrations-status"),{credentials:"same-origin",headers:{"X-WP-Nonce":p}})]).then(function(e){var t=m(e,2),i=t[0],n=t[1];return Promise.all([i.ok?i.json():Promise.reject("Failed to fetch settings"),n.ok?n.json():Promise.reject("Failed to fetch integrations")])}).then(function(e){var t=m(e,2),i=t[0],n=t[1];if(x(i),n&&n.connected&&V(n.connected),i&&i.settings){var a=i.settings;M({fma_debug_enabled:a.fma_debug_enabled||"0",fma_theme:a.fma_theme||"light",fma_locale:a.fma_locale||"en",fma_cm_theme:a.fma_cm_theme||"default"})}y(!1)}).catch(function(e){console.error("AFM Settings fetch error:",e),y(!1)})},100):console.warn("AFM Settings: Missing API root or nonce")},[u,p]);var X=function(e){if(e.preventDefault(),h&&!w){j(!0),N(null);var t={},i=[];if(e.target.querySelector('input[name="fma_user_role[]"][value="administrator"]')&&i.push("administrator"),e.target.querySelectorAll('input[name="fma_user_role[]"]:checked').forEach(function(e){"administrator"!==e.value&&i.push(e.value)}),i.length>0&&(t.fma_user_role=i),["fma_theme","fma_locale","public_path","public_url","upload_max_size","fma_upload_allow","fma_cm_theme"].forEach(function(i){var n=e.target.querySelector('input[name="'.concat(i,'"], select[name="').concat(i,'"], textarea[name="').concat(i,'"]'));n&&(t[i]=n.value||"")}),["hide_path","enable_trash","enable_htaccess","fma_debug_enabled","display_dot_files"].forEach(function(i){if("fma_debug_enabled"===i&&F.hasOwnProperty("fma_debug_enabled"))t[i]="1"===F.fma_debug_enabled||!0===F.fma_debug_enabled?"1":"0",console.log("AFM Debug: Using formValues for fma_debug_enabled:",t[i],"formValues:",F.fma_debug_enabled);else if(F.hasOwnProperty(i))t[i]="1"===F[i]||!0===F[i]?"1":"0";else{var n=e.target.querySelector('input[name="'.concat(i,'"]'));n&&(t[i]=n.checked?"1":"0","fma_debug_enabled"===i&&console.log("AFM Debug: Using DOM for fma_debug_enabled:",t[i],"checked:",n.checked))}}),"advanced-settings"===T){var n=[];e.target.querySelectorAll('input[name="display_ui_options[]"]:checked').forEach(function(e){n.push(e.value)}),t.display_ui_options=n}if("general-settings"===T){var a=[];e.target.querySelectorAll('input[name="blocked_integrations[]"]:checked').forEach(function(e){a.push(e.value)}),t.blocked_integrations=a}console.log("AFM Settings: Submitting data:",t),fetch("".concat(u,"file-manager-advanced/v1/settings"),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":p,"Content-Type":"application/json"},body:JSON.stringify(t)}).then(function(e){return e.json()}).then(function(e){if(j(!1),console.log("AFM Settings: Save response:",e),e.success){var t,i,n,a,o,s,l,r,c,m,u,p;N({type:"success",text:e.message||"Settings saved successfully."});var g=(null==h||null===(t=h.settings)||void 0===t?void 0:t.display_ui_options)||[],b=(null===(i=e.settings)||void 0===i?void 0:i.display_ui_options)||[],v=(null==h||null===(n=h.settings)||void 0===n?void 0:n.fma_locale)||F.fma_locale||"en",y=(null===(a=e.settings)||void 0===a?void 0:a.fma_locale)||v,_=JSON.stringify(f(g).sort())!==JSON.stringify(f(b).sort()),w=v!==y,S=((null==h||null===(o=h.settings)||void 0===o?void 0:o.fma_cm_theme)||"default")!==((null===(s=e.settings)||void 0===s?void 0:s.fma_cm_theme)||"default"),k=((null==h||null===(l=h.settings)||void 0===l?void 0:l.fma_theme)||"light")!==((null===(r=e.settings)||void 0===r?void 0:r.fma_theme)||"light"),z=String(null!==(c=null==h||null===(m=h.settings)||void 0===m?void 0:m.fma_debug_enabled)&&void 0!==c?c:"0"),C=String(null!==(u=null===(p=e.settings)||void 0===p?void 0:p.fma_debug_enabled)&&void 0!==u?u:"0"),I=_||S||k||z!==C;x(function(t){return d(d({},t),{},{settings:e.settings})}),e.settings&&(console.log("AFM Settings: Updating formValues with saved settings:",e.settings),M(function(t){var i=d(d({},t),{},{fma_debug_enabled:void 0!==e.settings.fma_debug_enabled?String(e.settings.fma_debug_enabled):t.fma_debug_enabled||"0",fma_theme:e.settings.fma_theme||t.fma_theme||"light",fma_locale:e.settings.fma_locale||t.fma_locale||"en",fma_cm_theme:e.settings.fma_cm_theme||t.fma_cm_theme||"default",upload_max_size:e.settings.upload_max_size||"0",fma_upload_allow:e.settings.fma_upload_allow||"all"});return console.log("AFM Settings: Updated formValues:",i),i}),(I||"advanced-settings"===T)&&(sessionStorage.setItem("afm_force_fm_reinit","true"),sessionStorage.removeItem("afm_ui_options_changed")),w&&(sessionStorage.setItem("afm_locale_changed","true"),(window.location.hash||"").includes("filemanager")&&window.dispatchEvent(new CustomEvent("afm-settings-changed",{detail:{type:"locale"}}))))}else N({type:"error",text:e.message||"Failed to save settings."});setTimeout(function(){return N(null)},5e3)}).catch(function(e){console.error("AFM Settings save error:",e),j(!1),N({type:"error",text:"Failed to save settings. Please try again."}),setTimeout(function(){return N(null)},5e3)})}};if(v)return(0,s.jsxs)("div",{className:"afm-settings-panel",style:{padding:"20px",background:"#fff",border:"1px solid #ccc"},children:[(0,s.jsx)("style",{children:"\n @keyframes afm-skeleton-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n .afm-skeleton {\n background-color: #e2e8f0;\n background-image: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);\n background-size: 200% 100%;\n animation: afm-skeleton-shimmer 1.4s linear infinite;\n }\n "}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"34px",width:"100%",borderRadius:"6px",marginBottom:"20px"}}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"20px",width:"260px",borderRadius:"6px",marginBottom:"16px"}}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,s.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"180px",borderRadius:"6px",marginTop:"16px"}})]});if(!h||!h.settings)return(0,s.jsx)("div",{className:"afm-settings-panel",style:{padding:"40px"},children:(0,s.jsx)("p",{children:"Failed to load settings."})});var $,Z,ee,te,ie=h.settings||{},ne=h.roles||{},ae=h.locales||{},oe=h.themes||{},se=h.cm_themes||[],le=h.ui_options||[],re=ie.fma_user_roles||["administrator"];return(0,s.jsx)("div",{className:"wrap fma afm-settings-panel",style:{background:"#fff",padding:"20px",border:"1px solid #ccc"},children:(0,s.jsxs)("div",{className:"afm-settings-form",children:[(0,s.jsxs)("h2",{className:"nav-tab-wrapper afm-clean-tabs",style:{marginBottom:"20px",borderBottom:"none"},children:[(0,s.jsx)("a",{href:"#/settings/general-settings",onClick:function(e){e.preventDefault(),sessionStorage.setItem("afm-settings-hash-just-set","true"),I("general-settings");var t="#/settings/general-settings";if(window.history&&window.history.replaceState){var i=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",i)}window.location.hash=t,setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)},className:"nav-tab afm-clean-tab ".concat("general-settings"===T?" nav-tab-active":""),children:"General Settings"}),(0,s.jsx)("a",{href:"#/settings/advanced-settings",onClick:function(e){e.preventDefault(),sessionStorage.setItem("afm-settings-hash-just-set","true"),I("advanced-settings");var t="#/settings/advanced-settings";if(window.history&&window.history.replaceState){var i=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",i)}window.location.hash=t,setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)},className:"nav-tab afm-clean-tab ".concat("advanced-settings"===T?" nav-tab-active":""),children:"Advanced Settings"})]}),k&&(0,s.jsxs)("div",{className:"afm-snackbar afm-snackbar-".concat("success"===k.type?"success":"error"),onClick:function(){return N(null)},style:{animation:"afm-slideIn 0.3s ease-out"},children:[(0,s.jsx)("span",{style:{fontSize:"14px",lineHeight:"1.5",flex:"1"},children:k.text}),(0,s.jsx)("button",{type:"button",className:"afm-snackbar-close",onClick:function(e){e.preventDefault(),e.stopPropagation(),N(null)},style:{background:"none",border:"none",padding:"0",cursor:"pointer",color:"inherit",fontSize:"18px",lineHeight:"1",marginLeft:"12px",opacity:"0.7",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]}),"general-settings"===T&&(0,s.jsxs)("form",{onSubmit:X,className:"afm-stacked-form",children:[(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",children:"Who can access File Manager?"}),(0,s.jsxs)("div",{className:"afm-field-input afm-checkbox-row",children:[(0,s.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",marginBottom:"0"},children:[(0,s.jsx)("input",{type:"checkbox",name:"fma_user_role[]",value:"administrator",defaultChecked:!0,disabled:!0,style:{marginRight:"6px"}}),"Administrator"]}),Object.keys(ne).filter(function(e){return"administrator"!==e}).map(function(e){var t=-1!==re.indexOf(e);return(0,s.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",marginBottom:"0"},children:[(0,s.jsx)("input",{type:"checkbox",name:"fma_user_role[]",value:e,defaultChecked:t,style:{marginRight:"6px"}}),ne[e]&&ne[e].name?ne[e].name:e]},e)})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"display_dot_files",children:"Hide Dot Files"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"checkbox",id:"display_dot_files",name:"display_dot_files",value:"1",defaultChecked:"1"==ie.display_dot_files,style:{marginRight:"6px"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Hide files and folders that start with a dot (.) from the file manager."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"Disabled"})]})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"hide_path",children:"Hide File Path in Info Dialog?"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"checkbox",id:"hide_path",name:"hide_path",value:"1",defaultChecked:"1"==ie.hide_path,style:{marginRight:"6px"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Hide real path of file in the Get Info dialog box."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"Disabled"})]})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"upload_max_size",children:"Maximum Upload Size"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"text",id:"upload_max_size",name:"upload_max_size",className:"regular-text",value:void 0!==F.upload_max_size?F.upload_max_size:ie.upload_max_size||"0",onChange:function(e){return M(function(t){return d(d({},t),{},{upload_max_size:e.target.value})})},style:{maxWidth:"400px",width:"100%"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Maximum upload file size. This size is per files. Can be set as number with unit like 10M, 500K, 1G. 0 means unlimited upload."})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"fma_upload_allow",children:"Mimetypes allowed to upload"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("textarea",{id:"fma_upload_allow",name:"fma_upload_allow",className:"large-text",rows:3,cols:30,value:void 0!==F.fma_upload_allow?F.fma_upload_allow:ie.fma_upload_allow||"all",onChange:function(e){return M(function(t){return d(d({},t),{},{fma_upload_allow:e.target.value})})},style:{width:"100%",maxWidth:"400px",padding:"8px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px",fontFamily:"inherit"}}),(0,s.jsxs)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:["Enter MIME types allowed to upload, multiple comma(,) separated. Example:"," ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"image/vnd.adobe.photoshop,image/png"})]}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"all"})," ",(0,s.jsx)("a",{href:"https://advancedfilemanager.com/advanced-file-manager-mime-types/",target:"_blank",rel:"noopener noreferrer",style:{color:"#2271b1",textDecoration:"none"},children:"MIME Types Help"})]})]})]}),q&&"business"===Q&&(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",children:"Blocked Integrations"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginBottom:"12px"},children:"Select integrations to block. Blocked integrations will not appear in the file manager."}),(Z=(null===($=window.afmReact)||void 0===$?void 0:$.proImagesURL)||"",ee=ie.blocked_integrations||[],te=[{key:"onedrive",name:"OneDrive",img:Z+"onedrive.svg",dbKey:"onedrive"},{key:"googledrive",name:"Google Drive",img:Z+"googledrive.svg",dbKey:"googledrive"},{key:"googlecloud",name:"Google Cloud Storage",img:Z+"googlecloud.svg",dbKey:"googlecloud"},{key:"dropbox",name:"Dropbox",img:Z+"dropbox.svg",dbKey:"dropbox"},{key:"amazonses",name:"Amazon S3",img:Z+"amazons3.svg",dbKey:"amazonses"},{key:"pcloud",name:"pCloud",img:Z+"pcloud.svg",dbKey:"pcloud"},{key:"cloudflarer2",name:"Cloudflare R2",img:Z+"cloudflarer2.svg",dbKey:"cloudflarer2"},{key:"wasabi",name:"Wasabi",img:Z+"wasabi.svg",dbKey:"wasabi"}].filter(function(e){return K[e.dbKey]}),0===te.length?(0,s.jsx)("p",{style:{fontSize:"12px",color:"#999",fontStyle:"italic",padding:"12px",background:"#f8f9fa",borderRadius:"4px"},children:"No connected integrations found."}):(0,s.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",gap:"12px"},children:te.map(function(e){var t=ee.includes(e.dbKey);return(0,s.jsxs)("label",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",border:"2px solid",borderColor:t?"#ffc107":"#e5e5e5",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",backgroundColor:t?"#fff3cd":"#fff",position:"relative",minHeight:"120px"},onMouseEnter:function(e){e.currentTarget.style.backgroundColor=t?"#ffe69c":"#f8f9fa",e.currentTarget.style.borderColor=t?"#ff9800":"#d0d0d0",e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 4px 8px rgba(0,0,0,0.1)"},onMouseLeave:function(e){e.currentTarget.style.backgroundColor=t?"#fff3cd":"#fff",e.currentTarget.style.borderColor=t?"#ffc107":"#e5e5e5",e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="none"},children:[(0,s.jsx)("input",{type:"checkbox",name:"blocked_integrations[]",value:e.dbKey,defaultChecked:t,style:{position:"absolute",top:"8px",right:"8px",cursor:"pointer",width:"18px",height:"18px"}}),(0,s.jsx)("div",{style:{width:"48px",height:"48px",borderRadius:"8px",background:"#f8f9fa",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0,marginTop:"8px"},children:e.img&&(0,s.jsx)("img",{src:e.img,alt:e.name,style:{width:"100%",height:"100%",objectFit:"contain"},onError:function(e){e.target.style.display="none"}})}),(0,s.jsxs)("div",{style:{textAlign:"center",width:"100%"},children:[(0,s.jsx)("div",{style:{fontSize:"13px",fontWeight:500,color:"#0f172a",marginBottom:"4px",lineHeight:"1.3"},children:e.name}),(0,s.jsx)("div",{style:{fontSize:"11px",color:t?"#856404":"#666",fontWeight:t?500:400},children:t?"Blocked":"Connected"})]})]},e.key)})}))]})]}),(0,s.jsx)("p",{className:"submit",style:{marginTop:"20px",paddingTop:"0"},children:(0,s.jsx)("input",{type:"submit",name:"submit",id:"submit",className:"button button-primary afm-teal-button",value:w?"Saving...":"Save Changes",disabled:w})})]}),"advanced-settings"===T&&(0,s.jsxs)("form",{onSubmit:X,className:"afm-stacked-form",children:[(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"fma_theme",children:"Theme"}),(0,s.jsxs)("div",{className:"afm-field-input",style:{position:"relative"},children:[(0,s.jsxs)("div",{style:{position:"relative",display:"inline-block",width:"100%",maxWidth:"400px"},children:[(0,s.jsxs)("div",{onClick:function(){return O(!D)},style:{padding:"8px 12px",border:"1px solid #ddd",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"14px",minHeight:"32px",width:"100%"},children:[(0,s.jsx)("span",{children:(null===(c=oe[F.fma_theme||ie.fma_theme||"light"])||void 0===c?void 0:c.title)||"Light"}),(0,s.jsx)("span",{style:{fontSize:"10px",color:"#666"},children:"▼"})]}),D&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9998},onClick:function(){return O(!1)}}),(0,s.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"#fff",border:"1px solid #ddd",borderRadius:"4px",marginTop:"4px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",zIndex:9999,maxHeight:"300px",overflowY:"auto"},children:Object.keys(oe).map(function(e){var t=oe[e],i=t.pro&&!h.has_pro,n=t.pro&&h.has_pro&&!Y,a=i||n,o=(F.fma_theme||ie.fma_theme||"light")===e;return(0,s.jsxs)("div",{onClick:function(t){if(t.stopPropagation(),a){var i;O(!1);var n=(null===(i=window.afmReact)||void 0===i?void 0:i.pricingUrl)||"https://advancedfilemanager.com/pricing/";if("function"==typeof window.file_manager_advanced_popup)window.file_manager_advanced_popup(n);else if(void 0!==window.jQuery&&window.jQuery){var o=(0,window.jQuery)("<a>",{class:"on-click-show-popup","fma-href":n,style:"display: none;"}).appendTo("body");o.trigger("click"),setTimeout(function(){o.remove()},100)}else window.open(n,"_blank")}else M(function(t){return d(d({},t),{},{fma_theme:e})}),O(!1)},style:{padding:"10px 12px",cursor:a?"not-allowed":"pointer",backgroundColor:o?"#f0f0f1":"#fff",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:a?.6:1,borderBottom:"1px solid #f0f0f0"},onMouseEnter:function(e){a||(e.currentTarget.style.backgroundColor="#f8f8f8")},onMouseLeave:function(e){a||(e.currentTarget.style.backgroundColor=o?"#f0f0f1":"#fff")},children:[(0,s.jsx)("span",{style:{fontSize:"14px"},children:t.title}),a&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"#ffd700",stroke:"none",style:{flexShrink:0,marginLeft:"8px"},children:(0,s.jsx)("path",{d:"M3 16h18M5 7h2l1 3h2l1-3h2l1 3h2l1-3h2v9H3V7z"})})]},e)})})]}),(0,s.jsx)("input",{type:"hidden",name:"fma_theme",value:F.fma_theme||ie.fma_theme||"light"})]}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Select file manager advanced theme. Default: Light"})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"fma_locale",children:"Language"}),(0,s.jsxs)("div",{className:"afm-field-input",style:{position:"relative"},children:[(0,s.jsxs)("div",{style:{position:"relative",display:"inline-block",width:"100%",maxWidth:"400px"},children:[(0,s.jsxs)("div",{onClick:function(){return W(!P)},style:{padding:"8px 12px",border:"1px solid #ddd",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"14px",minHeight:"32px",width:"100%"},children:[(0,s.jsx)("span",{children:Object.keys(ae).find(function(e){return ae[e]===(F.fma_locale||ie.fma_locale||"en")})||"en (English)"}),(0,s.jsx)("span",{style:{fontSize:"10px",color:"#666"},children:"▼"})]}),P&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9998},onClick:function(){return W(!1)}}),(0,s.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"#fff",border:"1px solid #ddd",borderRadius:"4px",marginTop:"4px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",zIndex:9999,maxHeight:"300px",overflowY:"auto"},children:Object.keys(ae).map(function(e){var t=ae[e],i=(F.fma_locale||ie.fma_locale||"en")===t;return(0,s.jsx)("div",{onClick:function(e){e.stopPropagation(),M(function(e){return d(d({},e),{},{fma_locale:t})}),W(!1)},style:{padding:"10px 12px",cursor:"pointer",backgroundColor:i?"#f0f0f1":"#fff",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0"},onMouseEnter:function(e){e.currentTarget.style.backgroundColor="#f8f8f8"},onMouseLeave:function(e){e.currentTarget.style.backgroundColor=i?"#f0f0f1":"#fff"},children:(0,s.jsx)("span",{style:{fontSize:"14px"},children:e})},e)})})]}),(0,s.jsx)("input",{type:"hidden",name:"fma_locale",value:F.fma_locale||ie.fma_locale||"en"})]}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Select file manager advanced language. Default: en (English)"})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",children:"View Type"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("div",{className:"afm-checkbox-row",children:le.map(function(e){var t=void 0===ie.display_ui_options||null===ie.display_ui_options||ie.display_ui_options.length>0&&-1!==ie.display_ui_options.indexOf(e);return(0,s.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",marginBottom:"0"},children:[(0,s.jsx)("input",{type:"checkbox",name:"display_ui_options[]",value:e,defaultChecked:t,style:{marginRight:"6px"}}),e]},e)})}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:"You can control the view of file manager. By default, all options are checked."})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsxs)("label",{className:"afm-field-label",htmlFor:"fma_cm_theme",children:["Code Editor Theme ",(0,s.jsx)("sup",{style:{color:"red",fontSize:"10px",verticalAlign:"super"},children:"New"})]}),(0,s.jsxs)("div",{className:"afm-field-input",style:{position:"relative"},children:[(0,s.jsxs)("div",{style:{position:"relative",display:"inline-block",width:"100%",maxWidth:"400px"},children:[(0,s.jsxs)("div",{onClick:function(){return L(!H)},style:{padding:"8px 12px",border:"1px solid #ddd",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"14px",minHeight:"32px",width:"100%"},children:[(0,s.jsx)("span",{children:F.fma_cm_theme||ie.fma_cm_theme||"default"}),(0,s.jsx)("span",{style:{fontSize:"10px",color:"#666"},children:"▼"})]}),H&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9998},onClick:function(){return L(!1)}}),(0,s.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"#fff",border:"1px solid #ddd",borderRadius:"4px",marginTop:"4px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",zIndex:9999,maxHeight:"300px",overflowY:"auto"},children:se.map(function(e){var t=e.pro&&!h.has_pro,i=e.pro&&h.has_pro&&!G,n=t||i,a=(F.fma_cm_theme||ie.fma_cm_theme||"default")===e.title;return(0,s.jsxs)("div",{onClick:function(t){if(t.stopPropagation(),n){var i;L(!1);var a=(null===(i=window.afmReact)||void 0===i?void 0:i.pricingUrl)||"https://advancedfilemanager.com/pricing/";if("function"==typeof window.file_manager_advanced_popup)window.file_manager_advanced_popup(a);else if(void 0!==window.jQuery&&window.jQuery){var o=(0,window.jQuery)("<a>",{class:"on-click-show-popup","fma-href":a,style:"display: none;"}).appendTo("body");o.trigger("click"),setTimeout(function(){o.remove()},100)}else window.open(a,"_blank")}else M(function(t){return d(d({},t),{},{fma_cm_theme:e.title})}),L(!1)},style:{padding:"10px 12px",cursor:n?"not-allowed":"pointer",backgroundColor:a?"#f0f0f1":"#fff",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:n?.6:1,borderBottom:"1px solid #f0f0f0"},onMouseEnter:function(e){n||(e.currentTarget.style.backgroundColor="#f8f8f8")},onMouseLeave:function(e){n||(e.currentTarget.style.backgroundColor=a?"#f0f0f1":"#fff")},children:[(0,s.jsx)("span",{style:{fontSize:"14px"},children:e.title}),n&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"#ffd700",stroke:"none",style:{flexShrink:0,marginLeft:"8px"},children:(0,s.jsx)("path",{d:"M3 16h18M5 7h2l1 3h2l1-3h2l1 3h2l1-3h2v9H3V7z"})})]},e.title)})})]}),(0,s.jsx)("input",{type:"hidden",name:"fma_cm_theme",value:F.fma_cm_theme||ie.fma_cm_theme||"default"})]}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Select code editor theme. Default: default"})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsxs)("label",{className:"afm-field-label",htmlFor:"fma_debug_enabled",children:["Debug in Code Editor ",(0,s.jsx)("sup",{style:{color:"red",fontSize:"10px",verticalAlign:"super"},children:"New"})]}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"checkbox",id:"fma_debug_enabled",name:"fma_debug_enabled",value:"1",checked:"1"===F.fma_debug_enabled||!0===F.fma_debug_enabled||void 0===F.fma_debug_enabled&&"1"==ie.fma_debug_enabled,onChange:function(e){var t=e.target.checked?"1":"0";console.log("AFM Debug: Checkbox changed, new value:",t),M(function(e){var i=d(d({},e),{},{fma_debug_enabled:t});return console.log("AFM Debug: Updated formValues:",i),i})},style:{marginRight:"6px"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Enable real-time PHP syntax error detection, highlighting, and debugging features in the code editor."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"Disabled"})]})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"enable_trash",children:"Enable Trash"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"checkbox",id:"enable_trash",name:"enable_trash",value:"1",defaultChecked:"1"==ie.enable_trash,style:{marginRight:"6px"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"Deleted files will go to trash folder, you can restore later."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:"Disabled"})]})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"public_path",children:"Web Root Path"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"text",id:"public_path",name:"public_path",className:"regular-text",defaultValue:ie.public_path||h.path,style:{maxWidth:"400px",width:"100%"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"File Manager Advanced Root Path, you can change according to your choice."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:h.path||""})]})]})]}),(0,s.jsxs)("div",{className:"afm-form-field",children:[(0,s.jsx)("label",{className:"afm-field-label",htmlFor:"public_url",children:"Web Root URL"}),(0,s.jsxs)("div",{className:"afm-field-input",children:[(0,s.jsx)("input",{type:"text",id:"public_url",name:"public_url",className:"regular-text",defaultValue:ie.public_url||h.url,style:{maxWidth:"400px",width:"100%"}}),(0,s.jsx)("p",{className:"description",style:{fontSize:"12px",color:"#666",marginTop:"6px"},children:"File Manager Advanced Files URL, you can change according to your choice."}),(0,s.jsxs)("p",{style:{fontSize:"12px",color:"#666",marginTop:"4px"},children:["Default: ",(0,s.jsx)("code",{style:{background:"#f0f0f1",padding:"2px 6px",borderRadius:"2px",fontSize:"11px"},children:h.url||""})]})]})]}),(0,s.jsx)("p",{className:"submit",style:{marginTop:"20px",paddingTop:"0"},children:(0,s.jsx)("input",{type:"submit",name:"submit",id:"submit",className:"button button-primary afm-teal-button",value:w?"Saving...":"Save Changes",disabled:w})})]})]})})}},5688(e,t,i){function n(){var e,t;return function(e){if(!e||"string"!=typeof e)return e;try{var t=new URL(e,window.location.origin);return t.protocol=window.location.protocol,t.host=window.location.host,t.toString()}catch(t){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(t=window.afmReact)||void 0===t?void 0:t.jsonURL)||"/wp-json/")}i.d(t,{lA:()=>n})},7850(e,t,i){i.d(t,{w:()=>a});var n={basic:{dropbox:!1,googledrive:!1,onedrive:!1,amazons3:!1,github:!1,googlecloud:!1,pcloud:!1,cloudflarer2:!1,wasabi:!1,digitalocean:!1,email_notification:!0,slack_notification:!1,filelogs:!0,adminer:!1,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!1,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!1,gutenberg_blocks:!0,code_editor_themes:!1,ai_integration:!1},professional:{dropbox:!1,googledrive:!1,onedrive:!1,amazons3:!1,github:!1,googlecloud:!1,pcloud:!1,cloudflarer2:!1,wasabi:!1,digitalocean:!1,email_notification:!0,slack_notification:!1,filelogs:!0,adminer:!0,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!1},business:{dropbox:!0,googledrive:!0,onedrive:!0,amazons3:!0,github:!0,googlecloud:!0,pcloud:!0,cloudflarer2:!0,wasabi:!0,digitalocean:!1,email_notification:!0,slack_notification:!0,filelogs:!0,adminer:!0,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!0}};function a(e,t,i){return!!i&&"free"!==t&&!!n[t]&&!0===n[t][e]}}}]);
//# sourceMappingURL=886.c59b4be7.chunk.js.map